<?php
class InsertProfile extends Model {
	function InsertProfile(){
		parent::Model();
    }
    function insertData($id,$username,$password){
    	$result= array();
    	$query = "UPDATE user SET isActive=1, username='$username', password='$password' WHERE id=$id";
    	$query = $this->db->query($query);
    		if($query){
				$result['instProfile']= TRUE;
				$result['id'] = $this->db->insert_id();
		    }else{
		    	$result['instProfile']= FALSE;
		    	return json_encode($result);
	 		}
	 	return json_encode($result);	
    }
}